n = int(eval(input('请输入n:')))
num = 0
while n != 1:
    if n & 1:
        n *= 3
        n += 1
    else:
        n //= 2
    num += 1
print('变成1经过的步骤数为：', num)